package com.cmwa.scbp.sys.permission.privilege.entity;

import org.apache.ibatis.type.Alias;
import org.springframework.util.StringUtils;

import com.cmwa.scbp.base.mvc.entity.BaseVo;
import com.cmwa.scbp.utils.cached.Cached;
import com.cmwa.scbp.utils.cached.DictionaryCached;
import com.cmwa.scbp.utils.cached.EmployeeCached;

/**
 * 权限实体类
 * @author ex-huangch
 * @Date 2016年5月24日 下午5:56:30
 * @Description
 */
@Alias("privilegeVo")
public class PrivilegeVo extends BaseVo {
	
	/**
	 * 角色ID  编码规则：6位流水号
	 */
	private String roleId;
	
	/**
	 * 角色名称
	 */
	private String roleName;
	
	/**
	 * 角色类型(ROLE_XXX_TYPE)
	 */
	private String roleType;
	
	/**
	 * 状态
	 */
	private String stat;
	
	
	/**
	 * 经办人ID
	 */
	private String createId;
	
	/**
	 * 经办时间
	 */
	private String createTime;
	
	/**
	 * 修改人
	 */
	private String modifyId;
	
	/**
	 *修改时间
	 */
	private String modifyTime;
	
	/**
	 * 员工姓名（多名）
	 */
	@Cached
	private String empsName;
	
	private String empIds;
	
	/**
	 * 资源ID
	 */
	private String resId;
	
	/**
	 * 资源名称
	 */
	private String resName;
	
	/**
	 * 权限类型(1:普通,2:特殊)
	 */
	private String authorityType;
	
/*	*//**
	 * 角色类型(ROLE_XXX_TYPE)
	 *//*
	private String roleTypeCode;*/
	
	/**
	 * 状态名称
	 */
	@Cached
	private String statName;
	
	/**
	 * 角色类型名称
	 */
	@Cached
	private String roleTypeName;
	
	/**
	 * 经办人名称
	 */
	@Cached
	private String createName;
	
	/**
	 * 修改人名称
	 */
	@Cached
	private String modifyName;
	
	/** 资源项目经理ID */
	private String mgrIds;
	
	/** 资源项目经理名称 */
	private String mgrNames;
	
	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleType() {
		return roleType;
	}

	public void setRoleType(String roleType) {
		this.roleType = roleType;
	}

	public String getStat() {
		return stat;
	}

	public void setStat(String stat) {
		this.stat = stat;
	}

	public String getCreateId() {
		return createId;
	}

	public void setCreateId(String createId) {
		this.createId = createId;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getModifyId() {
		return modifyId;
	}

	public void setModifyId(String modifyId) {
		this.modifyId = modifyId;
	}

	public String getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getAuthorityType() {
		return authorityType;
	}

	public void setAuthorityType(String authorityType) {
		this.authorityType = authorityType;
	}

	public String getStatName() {
		if(stat!=null){
			return DictionaryCached.getDictName("DAT_CHK_SAT", stat);
		}
		return statName;
	}

	public void setStatName(String statName) {
		this.statName = statName;
	}

	public String getRoleTypeName() {
		if(roleType!=null){
			return DictionaryCached.getDictName("ROLE_XXX_TYPE", roleType);
		}
		return roleTypeName;
	}

	public void setRoleTypeName(String roleTypeName) {
		this.roleTypeName = roleTypeName;
	}

	public String getCreateName() {
		if(createId!=null){
			return EmployeeCached.getName(createId);
		}
		return createName;
	}

	public void setCreateName(String createName) {
		this.createName = createName;
	}

	public String getModifyName() {
		if(modifyId!=null){
			return EmployeeCached.getName(modifyId);
		}
		return modifyName;
	}

	public void setModifyName(String modifyName) {
		this.modifyName = modifyName;
	}

	public String getEmpsName() {
		if (!StringUtils.isEmpty(empIds)) {
			return EmployeeCached.getAllName(empIds);
		}
		return empsName;
	}

	public void setEmpsName(String empsName) {
		this.empsName = empsName;
	}

	
	public String getEmpIds() {
		return empIds;
	}

	public void setEmpIds(String empIds) {
		this.empIds = empIds;
	}

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId;
	}

	public String getResName() {
		return resName;
	}

	public void setResName(String resName) {
		this.resName = resName;
	}

	public String getMgrIds() {
		return mgrIds;
	}

	public void setMgrIds(String mgrIds) {
		this.mgrIds = mgrIds;
	}

	public String getMgrNames() {
		if (mgrIds != null) {
			return EmployeeCached.getAllName(mgrIds);
		}
		return mgrNames;
	}

	public void setMgrNames(String mgrNames) {
		this.mgrNames = mgrNames;
	}
	
	
	
}
